import styles from './nav.less';

// 自定义hooks
import useWeather from '../utils/useWeather';
import useTime from '../utils/useTime';

const Nav = () => {
  const [wtNm, wtTemp] = useWeather();
  const timeStr = useTime();

  return (
    <div className={styles.nav}>
      <div className={styles.left}>首页</div>
      <div className={styles.right}>
        <span>
          {wtNm} - {wtTemp}℃ -{' '}
        </span>
        <span>{timeStr}</span>
      </div>
    </div>
  );
};

export default Nav;
